WPF中,Grid与Table的区别(英文)

您所在的位置:网站首页 wpf datagrid pagination WPF中,Grid与Table的区别(英文)

WPF中,Grid与Table的区别(英文)

2023-02-28 18:54| 来源: 网络整理| 查看: 265

How is Grid Different from Table?Table and Grid share some common functionality, but each is best suited for different scenarios.(1)Grid derives from the Panel element, it defines a flexible grid area that consists of columns and rows.Table derives from the Block element, and adheres to the common rules for containing a Block element. A Table element may be contained by any of the following elements: FlowDocument, TableCell, ListBoxItem, ListViewItem, Section, Floater, Figure.

(2) A Table is designed for use within flow content. Grids are best used inside of forms (basically anywhere outside of flow content).

(3) Within a FlowDocument, Table supports flow content behaviors like pagination, column reflow, and content selection while a Grid does not.

(4)A Grid on the other hand is best used outside of a FlowDocument for many reasons including Grid adds elements based on a row and column index, Table does not.

(5)The Grid element allows layering of child content, allowing more than one element to exist within a single "cell." Table does not support layering.

(6)Child elements of a Grid can be absolutely positioned relative to the area of their "cell" boundaries. Table does not support this feature.

(7)Finally, Grid also offers more flexible resizing behavior than Table. A Grid is lighter weight then a Table.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3